package com.example.composewanandroid.navigation

import androidx.compose.runtime.compositionLocalOf
import androidx.navigation.NavHostController

// 定义一个 CompositionLocal 用于在组件树中提供导航控制器
val LocalNavController = compositionLocalOf<NavHostController> {
    // 当在组件树中找不到提供的 NavHostController 时，会触发此错误
    error("CompositionLocal LocalNavController not present")
}